#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QThread>

#include "applicatonengine.h"


int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    qDebug()<<"当前主线程 : "<<QThread::currentThreadId();

    ApplicatonEngine engine;

    engine.loadFromModule("CNC_Double_Head_Saw", "Root");

    QObject::connect(
        &engine,
        &QQmlApplicationEngine::objectCreationFailed,
        &app,
        []() { QCoreApplication::exit(-1); },
        Qt::QueuedConnection);




    return app.exec();
}
